package com.blb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.blb.entity.Company;
import com.blb.entity.Product;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SupplierMapper extends BaseMapper<SupplierMapper> {

    public List<Company> getSupplier(@Param("id") String id, @Param("start") Integer start, @Param("length") Integer length,@Param("sname") String sname,@Param("companyAddress") String companyAddress);

    public int getSupplierCount(@Param("id") String id,@Param("sname") String sname,@Param("companyAddress") String companyAddress);

    public List<Product> getProduct(@Param("id") String id, @Param("start") Integer start, @Param("length") Integer length,@Param("sid") String sid,@Param("sortType") Integer sortType);

    public int getProductCount(@Param("id") String id,@Param("sid") String sid,@Param("sortType") Integer sortType);

    public Product getProById(@Param("id") String id);

}
